POV-Ray : Newsgroups : povray.general : Doc bug - substr() : Re: Doc bug? #range - not a doc bug. Server Time
8 Aug 2024 12:24:01 EDT (-0400)
  Re: Doc bug? #range - not a doc bug.  
From: Francois Labreque
Date: 22 Feb 2001 21:16:03
Message: <3A95C73E.8AE8DD82@videotron.ca>
"Bob H." wrote:
> 
> "Francois Labreque" <fla### [at] videotronca> wrote in message
> news:3A952F9F.43B9E767@videotron.ca...
> >
> > Geoff Wedig wrote:
> > >
> > > Speaking of manual bugs, can anyone confirm that the #range feature for
> > > #switch is actually lower < value <= upper and not lower <= value <=
> upper
> > > like it says in the manual?
> >
> > The doc is correct.
> >
> > #switch( var)
> >     #range (1, 10)
> >         box{ 0, 1 pigment{ color rgb 1 }}
> >     #else
> > sphere{ 0, 1 pigment { color rgb <1,0,0> }}
> > #end
> >
> > creates a white box when var=1, not a red sphere as you think it would.
> 
> Nope, sorry.  Not so it would seem.  It is 1 to 10 inclusive but you need a
> #break ahead of the #else otherwise you actually get both objects.  In
> MegaPov anyway.

I forgot to type the #break statement, so sue me!

[Note to self:  Never post before your morning coffee]
-- 
Francois Labreque |   //\\    Wear an ASCII ribbon!
    flabreque     |  ||  ||   
        @         |   \\//    Support the campain
   videotron.ca        \\     against HTML e-mail
                      //\\    and news!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.